package dongze.com.ckdj.databinding.model;

import android.databinding.BaseObservable;
import android.databinding.Bindable;
import android.databinding.BindingAdapter;
import android.databinding.BindingConversion;
import android.databinding.ObservableArrayList;
import android.databinding.ObservableField;
import android.databinding.ObservableList;
import android.graphics.Bitmap;
import android.media.Image;
import android.widget.AdapterView;

import java.util.List;

import dongze.com.ckdj.BR;
import dongze.com.ckdj.ui.MassLossPictureGridLayout;

/**
 * Created by fanqwz on 2017/7/24.
 */

public class MassLossDataModel extends BaseObservable {
    public ObservableField<String> reason = new ObservableField<>();
    public ObservableField<String> position = new ObservableField<>();
    public ObservableField<String> level = new ObservableField<>();

    @Bindable
    String[] entries;

    public String[] getEntries() {
        return entries;
    }

    public void setEntries(String[] entries) {
        this.entries = entries;
        notifyPropertyChanged(BR.entries);
    }

    @Bindable
    public AdapterView.OnItemClickListener getOnReasonClickListener() {
        return onReasonClickListener;
    }

    public void setOnReasonClickListener(AdapterView.OnItemClickListener onReasonClickListener) {
        this.onReasonClickListener = onReasonClickListener;
        notifyPropertyChanged(BR.onReasonClickListener);
    }

    AdapterView.OnItemClickListener onReasonClickListener;


//    @BindingAdapter({"app:binding"})
//    public static void bindMassLossPictureGridLayout(MassLossPictureGridLayout gridLayout, final List<Image> pictures) {
//        gridLayout.setPictureList(pictures);
//    }
}
